home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Sample Code / AppsToGo / ! AppsToGo⁄CW build info next >
Encoding:
Text File  |  1994-09-22  |  4.8 KB  |  102 lines  |  [TEXT/MMCC]

  1. • Important Metrowerks/AppsToGo editor change:
  2.  
  3. Due to how CodeWarrior handles the resource fork of the current project, and how the AppsToGo
  4. editor used to manage resources, a change had to be made.  Since the resource file for the
  5. project isn’t ever considered part of the running project in CodeWarrior (unlike THINK), it
  6. was necessary for the framework to place the resource changes in BOTH the running application
  7. AND the “ copy” version of the resource fork (or application).  If this makes no sense, see the
  8. =AppsToGo Manual document for more detail.
  9.  
  10. Note that the framework can only propogate the resource change if there is a “ copy” resource
  11. file, AND that file is not opened already by a resource editor.
  12.  
  13.  
  14. • Metrowerks/AppsToGo Installation:
  15.  
  16. 1)    Start with a new copy of CodeWarrior CW4.
  17. 2)    Copy the AppsToGo package your machine.
  18.  
  19. Now that everything is on the same hard disk, you need to first get the AppsToGo header files
  20. placed correctly and precompiled.
  21.  
  22. Copy the “DTS.Lib.headers” folder into the CodeWarrior project folder.  A good place is the
  23. “Metrowerks C/C++ ƒ” folder.
  24.  
  25. Now open the copy of “DTS.Lib.headers” and double-click on “DTS2Headers.project”.  Single-click
  26. on the DTS2Headers entry in the project (so that the precompile menu option is no longer
  27. grayed out).  Precompile.  (This will take a while.)
  28.  
  29. When the precompile finally finishes, save as “DTS2Headers”.  The current directory is a fine
  30. place to save the precompiled headers.
  31.  
  32. Repeat the precompile process for “DTS2Headers.project”.  The “DTS2Headers” are for 68k, and
  33. the “DTS3Headers” are for PPC.
  34.  
  35. One this process is done, then the libraries need to be built for both 68k and PPC.
  36.  
  37.  
  38. To build the libraries, first open the “DTS.Lib” folder.  You will find three directories:
  39.  
  40. DTS1 (THINK)
  41. DTS2 (MW.68k)
  42. DTS3 (MW.PPC)
  43.  
  44. View the window in “View by name” mode.  Then single-click on the triangle for “DTS2 (MW.68k)”
  45. to view the contents in-line.  Select the contents, and then drag the selected contents above
  46. “DTS1 (THINK)” and drop it.  This moves the contents of “DTS1 (THINK)” to the same level as all
  47. of the source files.
  48.  
  49. If you do not do the above step, when you try to build the libraries, CW will not be able to
  50. find the source files.  The project file needs to be at the same directory level or higher
  51. than the source files.
  52.  
  53. Once you have the project files for the libraries placed correctly, just double-click the first
  54. one and do a command-M to make the library.  It will be saved right by the project file.  Do
  55. all of the “DTS2 (MW.68k)” libraries in this fashion.
  56.  
  57. Once they are all made, you will want to move them into a CW folder for libraries.  Inside of
  58. “Metrowerks C/C++ ƒ:Libraries ƒ”.  I create a directory called “DTS2.libraries” and move
  59. the libraries into this.
  60.  
  61. Once the libraries are built, you can move the project files back into the “DTS2 (MW.68k)”
  62. folder.  There should be 12 AppsToGo libraries for the 68k side of Metrowerks.
  63.  
  64. Repeat this process for “DTS3 (MW.PPC)”.  You are now ready to build either 68k or PPC
  65. applications with AppsToGo and Metrowerks.  Save the libraries in a folder inside of
  66. “Metrowerks C/C++ ƒ:Libraries ƒ” called DTS3.libraries.  There should only be 11 libraries
  67. for the PPC side of Metrowerks, since one of the AppsToGo libraries is balloon help support
  68. for system 6.  This is obviously useless on the PPC side.
  69.  
  70. Now for building the sample applications:
  71.  
  72. Let's assume that you want to build AppWannabe.  Open that folder, but before building,
  73. you need to set up just one thing.
  74.  
  75. The .rsrc file is set up for THINK.  Leave it this way.  Single-click on it, and then duplicate
  76. it.  Rename the copy “AppWannabe.68k copy”.  Create another and rename it “AppWannabe.PPC copy”.
  77. You are now ready to build via the Metrowerks project files that are in the AppWannabe folder.
  78.  
  79. For any AppsToGo sample application, you will need to do the above .rsrc strategy for
  80. its .rsrc file.
  81.  
  82. AppWannabe has one more Metrowerks project file, called AppWannabe.µ.FAT.  This is just a sample
  83. of how to set up a project file for building fat applications.  Here's how I created it:
  84.  
  85. 1) First build AppWannabe.68k.
  86. 2) Open AppWannabe.68k with ResEdit and change the file type from 'APPL' to 'rsrc'.
  87. 3) Copy the AppWannabe.µ.PPC project file.
  88. 4) Remove the "AppWannabe.PPC copy" resource entry.
  89. 5) Add "AppWannabe.68k" as a resource file in its place.
  90.  
  91. Now to build a fat application, you just first build the 68k version, and then build the PPC
  92. version using AppWannabe.µ.FAT.  When it comes time to copy the resources, the AppWannabe.68k
  93. application will be copied in.  Note that you only have to change the file type to 'rsrc'
  94. when you first include AppWannabe.68k into the project file.  From then on, it will be treated
  95. as a resource file by Metrowerks, even if you change AppWannabe.68k back to type 'APPL'.
  96.  
  97.  
  98. That's all there is to it!!  Have a party...
  99.  
  100.  
  101. Eric Soldan, Apple DTS
  102.